package cn.sofwin.day0120.homework.bank.com;

/**
 * 银行服务系统
 * @author 仙女本仙
 * @email 1335651292@qq.com
 */
public class Account {
    double money;

    /**
     * 存款
     *
     * @param money 存款金额
     */
    public void deposit(double money) {

        this.money += money;
        System.out.println("存款成功！");
        System.out.println("*******当前余额为" + this.money + "********");
    }

    /**
     * 取款
     * @param money 取款金额
     */
    public void withdrawal(double money) {
        System.out.println("请输入取款金额");

        if (this.money >= money) {
            this.money -= money;
            System.out.println("取款成功！");
            System.out.println("*******当前余额为" + this.money + "********");
        } else {
            System.out.println("余额不足！");
        }

    }
}
